//state容器
import { getCookies } from "./cookies";

export default {
    
    state: {
        id:getCookies("id"),
        parkid:getCookies("parkid"),
        entid:getCookies("entid"),
        loginname:getCookies("loginname"),
        name:getCookies("name"),
        email:getCookies("email"),
        mobile:getCookies("mobile"),
        remark:getCookies("remark"),
        type:getCookies("type"),
        addtime:getCookies("addtime"),
        token:getCookies("token"),
        //判断用户的cookie是否存在
        islogin:isEmpty(getCookies("id")),


    },
}

function isEmpty(value){
    
    if (value =="" || value == undefined||  value ==  'undefined' ||  value ==  null) {
        return false
    }else{
        return true
    };
}